package com.study.dao;

import com.study.pojo.entity.ArticleDTO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
@Repository
public interface ArticleRepository extends JpaRepository<ArticleDTO,Integer> {
    @Query(value = "select article_title as articleTitle,article_pic as articlePic,article_url as articleUrl,article_wirter as articleWirter,id from article ",nativeQuery = true)
    List<Map<String,Object>> findAriticle();
}

